<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>书籍管理</title>
    <script src="/js/jquery-3.3.1.js"></script>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body>
<table class="table table-striped table-dark" style="width: 80%;margin: 0px auto;">
    <thead>
    <tr>
        <th scope="col">书名</th>
        <th scope="col">作者</th>
        <th scope="col">价格</th>
        <th scope="col">销量</th>
        <th scope="col">库存</th>
        <th scope="col">图片</th>
        <th scope="col">操作</th>
        <th scope="col"></th>
    </tr>
    </thead>
    <tbody th:each="book : ${books}">
    <th scope="row" th:text="${book.name}"></th>
    <td th:text="${book.author}"></td>
    <td th:text="${book.price}"></td>
    <td th:text="${book.sales}"></td>
    <td th:text="${book.stock}"></td>
    <td><img th:src="@{/img/default.jpg}" width="40px" height="50px"></td>
    <td><button class="btn btn-warning" >修改</button></td>
    <td><button class="btn btn-danger" >删除</button></td>
    </tbody>
</table>
</body>
</html>